//
//  HNTodayModel.m
//  XDEducation
//
//  Created by 星道 on 17/5/22.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "HNTodayModel.h"

@implementation HNTodayModel

- (void)SetDict:(NSDictionary *)Dict
{
    [self setValuesForKeysWithDictionary:Dict];
}

- (void)setValue:(id)value forKey:(NSString *)key
{
    if ([key isEqualToString:@"list"])
    {
        for (NSDictionary *Dict in value)
        {
            [self.list addObject:[[list alloc] init_HNModelWithDict:Dict]];
        }
    }
    else
    {
        [super setValue:value forKey:key];
    }
}

- (NSMutableArray<list *> *)list
{
    if (!_list)
    {
        _list = [NSMutableArray array];
    }
    return _list;
}
@end

@implementation list

- (instancetype)init_HNModelWithDict:(NSDictionary *)Dict
{
    self = [super init];
    if (self)
    {
        [self setValuesForKeysWithDictionary:Dict];
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key{};
@end
